extends Panel

const ENTER = preload("uid://ccu6hxk56pwmb")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	pivot_offset=size/2
	var twn:=create_tween()
	twn.tween_property(material,"shader_parameter/time",1.5,0.8)
	twn.tween_property(material,"shader_parameter/time",1.5,1.5)
	twn.tween_callback(func():material.set_shader_parameter("time",-0.5))
	twn.set_loops()
	pass # Replace with function body.

var mouse_in:bool=false
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	if mouse_in:
		scale=scale.move_toward(Vector2.ONE*1.2,delta)
	else:
		scale=scale.move_toward(Vector2.ONE,delta)
	pass


func _on_mouse_entered() -> void:
	mouse_in=true
	pass # Replace with function body.


func _on_mouse_exited() -> void:
	mouse_in=false
	pass # Replace with function body.


func _on_exit_pressed() -> void:
	get_tree().paused=false
	Global.save_game_level.emit()
	if Global.enter:get_tree().change_scene_to_packed(Global.enter)
	pass # Replace with function body.
